<div id="Common-options"></div>
<div class="header">
<p>
Next: [[cvs: admin--Administration#admin&mdash;Administration|admin]], Previous: [[cvs: Global options#Global options|Global options]], Up: [[cvs: Guide to CVS commands#Guide to CVS commands|CVS commands]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Common-command-options"></div>
=== Common command options ===
<div id="index-Common-options"></div>
<div id="index-Right_002dhand-options"></div>

This section describes the &lsquo;<code>command_options</code>&rsquo; that
are available across several <small>CVS</small> commands.  These
options are always given to the right of
&lsquo;<code>cvs_command</code>&rsquo;. Not all
commands support all of these options; each option is
only supported for commands where it makes sense.
However, when a command has one of these options you
can almost always count on the same behavior of the
option as in other commands.  (Other command options,
which are listed with the individual commands, may have
different behavior from one <small>CVS</small> command to the other).

'''Note: the &lsquo;<code>history</code>&rsquo; command is an exception; it supports
many options that conflict even with these standard options.'''

<div id="index-Dates"></div>
<div id="index-Time"></div>
<div id="index-Specifying-dates"></div>
;<code>-D <var>date_spec</var></code>
: Use the most recent revision no later than <var>date_spec</var>. <var>date_spec</var> is a single argument, a date description specifying a date in the past.

: The specification is <em>sticky</em> when you use it to make a private copy of a source file; that is, when you get a working file using &lsquo;<code>-D</code>&rsquo;, <small>CVS</small> records the date you specified, so that further updates in the same directory will use the same date (for more information on sticky tags/dates, see [[cvs: Sticky tags#Sticky tags|Sticky tags]]).

: &lsquo;<code>-D</code>&rsquo; is available with the <code>annotate</code>, <code>checkout</code>, <code>diff</code>, <code>export</code>, <code>history</code>, <code>rdiff</code>, <code>rtag</code>, <code>tag</code>, and <code>update</code> commands. (The <code>history</code> command uses this option in a slightly different way; see [[cvs: history options#history options|history options]]).


<div id="index-Timezone_002c-in-input"></div>
<div id="index-Zone_002c-time_002c-in-input"></div>
: A wide variety of date formats are supported by <small>CVS</small>.  The most standard ones are ISO8601 (from the International Standards Organization) and the Internet e-mail standard (specified in RFC822 as amended by RFC1123).

: ISO8601 dates have many variants but a few examples are:

<div class="example" style="margin-left: 3.2em">
 1972-09-24
 1972-09-24 20:05
</div>

: There are a lot more ISO8601 date formats, and <small>CVS</small> accepts many of them, but you probably don&rsquo;t want to hear the ''whole'' long story<nowiki> :</nowiki>-).


: In addition to the dates allowed in Internet e-mail itself, <small>CVS</small> also allows some of the fields to be omitted.  For example:

<div class="example" style="margin-left: 3.2em">
 24 Sep 1972 20:05
 24 Sep
</div>

: The date is interpreted as being in the local timezone, unless a specific timezone is specified.

: These two date formats are preferred.  However, <small>CVS</small> currently accepts a wide variety of other date formats.  They are intentionally not documented here in any detail, and future versions of <small>CVS</small> might not accept all of them.

: One such format is <code><var>month</var>/<var>day</var>/<var>year</var></code>.  This may confuse people who are accustomed to having the month and day in the other order; &lsquo;<code>1/4/96</code>&rsquo; is January 4, not April 1.

: Remember to quote the argument to the &lsquo;<code>-D</code>&rsquo; flag so that your shell doesn&rsquo;t interpret spaces as argument separators.  A command using the &lsquo;<code>-D</code>&rsquo; flag can look like this:

<div class="example" style="margin-left: 3.2em">
 $ cvs diff -D &quot;1 hour ago&quot; cvs.texinfo
</div>

<div id="index-Forcing-a-tag-match"></div>
;<code>-f</code>
: When you specify a particular date or tag to <small>CVS</small> commands, they normally ignore files that do not contain the tag (or did not exist prior to the date) that you specified.  Use the &lsquo;<code>-f</code>&rsquo; option if you want files retrieved even when there is no match for the tag or date.  (The most recent revision of the file will be used).

: Note that even with &lsquo;<code>-f</code>&rsquo;, a tag that you specify must exist (that is, in some file, not necessary in every file).  This is so that <small>CVS</small> will continue to give an error if you mistype a tag name.

: &lsquo;<code>-f</code>&rsquo; is available with these commands: <code>annotate</code>, <code>checkout</code>, <code>export</code>, <code>rdiff</code>, <code>rtag</code>, and <code>update</code>.

: '''WARNING:  The <code>commit</code> and <code>remove</code> commands also have a &lsquo;<code>-f</code>&rsquo; option, but it has a different behavior for those commands.  See [[cvs: commit options#commit options|commit options]], and [[cvs: Removing files#Removing files|Removing files]].'''

;<code>-k <var>kflag</var></code>
: Override the default processing of RCS keywords other than &lsquo;<code>-kb</code>&rsquo;.  See [[cvs: Keyword substitution#Keyword substitution|Keyword substitution]], for the meaning of <var>kflag</var>.  Used with the <code>checkout</code> and <code>update</code> commands, your <var>kflag</var> specification is <em>sticky</em>; that is, when you use this option with a <code>checkout</code> or <code>update</code> command, <small>CVS</small> associates your selected <var>kflag</var> with any files it operates on, and continues to use that <var>kflag</var> with future commands on the same files until you specify otherwise.

: The &lsquo;<code>-k</code>&rsquo; option is available with the <code>add</code>, <code>checkout</code>, <code>diff</code>, <code>export</code>, <code>import</code> and <code>update</code> commands.

: '''WARNING: Prior to CVS version 1.12.2, the &lsquo;<code>-k</code>&rsquo; flag overrode the &lsquo;<code>-kb</code>&rsquo; indication for a binary file.  This could sometimes corrupt binary files.  See [[cvs: Merging and keywords#Merging and keywords|Merging and keywords]], for more.'''

;<code>-l</code>
: Local; run only in current working directory, rather than recursing through subdirectories.

: Available with the following commands: <code>annotate</code>, <code>checkout</code>, <code>commit</code>, <code>diff</code>, <code>edit</code>, <code>editors</code>, <code>export</code>, <code>log</code>, <code>rdiff</code>, <code>remove</code>, <code>rtag</code>, <code>status</code>, <code>tag</code>, <code>unedit</code>, <code>update</code>, <code>watch</code>, and <code>watchers</code>.

<div id="index-Editor_002c-avoiding-invocation-of"></div>
<div id="index-Avoiding-editor-invocation"></div>
;<code>-m <var>message</var></code>
: Use <var>message</var> as log information, instead of invoking an editor.

: Available with the following commands: <code>add</code>, <code>commit</code> and <code>import</code>.

;<code>-n</code>
: Do not run any tag program.  (A program can be specified to run in the modules database (see [[cvs: The modules file#The modules file|modules]]); this option bypasses it).

: '''Note: this is not the same as the &lsquo;<code>cvs -n</code>&rsquo; program option, which you can specify to the left of a cvs command!'''

: Available with the <code>checkout</code>, <code>commit</code>, <code>export</code>, and <code>rtag</code> commands.

;<code>-P</code>
: Prune empty directories.  See [[cvs: Removing directories#Removing directories|Removing directories]].

;<code>-p</code>
: Pipe the files retrieved from the repository to standard output, rather than writing them in the current directory.  Available with the <code>checkout</code> and <code>update</code> commands.

;<code>-R</code>
: Process directories recursively.  This is on by default.

: Available with the following commands: <code>annotate</code>, <code>checkout</code>, <code>commit</code>, <code>diff</code>, <code>edit</code>, <code>editors</code>, <code>export</code>, <code>rdiff</code>, <code>remove</code>, <code>rtag</code>, <code>status</code>, <code>tag</code>, <code>unedit</code>, <code>update</code>, <code>watch</code>, and <code>watchers</code>.

;<code>-r <var>tag</var></code>
<div id="index-HEAD_002c-special-tag"></div>
<div id="index-BASE_002c-special-tag"></div>
: Use the revision specified by the <var>tag</var> argument instead of the default <em>head</em> revision.  As well as arbitrary tags defined with the <code>tag</code> or <code>rtag</code> command, two special tags are always available: &lsquo;<code>HEAD</code>&rsquo; refers to the most recent version available in the repository, and &lsquo;<code>BASE</code>&rsquo; refers to the revision you last checked out into the current working directory.


: The tag specification is sticky when you use this with <code>checkout</code> or <code>update</code> to make your own copy of a file: <small>CVS</small> remembers the tag and continues to use it on future update commands, until you specify otherwise (for more information on sticky tags/dates, see [[cvs: Sticky tags#Sticky tags|Sticky tags]]).

: The tag can be either a symbolic or numeric tag, as described in [[cvs: Tags-Symbolic revisions#Tags&ndash;Symbolic revisions|Tags]], or the name of a branch, as described in [[cvs: Branching and merging#Branching and merging|Branching and merging]].

: Specifying the &lsquo;<code>-q</code>&rsquo; global option along with the &lsquo;<code>-r</code>&rsquo; command option is often useful, to suppress the warning messages when the <small>RCS</small> file does not contain the specified tag.

: '''Note: this is not the same as the overall &lsquo;<code>cvs -r</code>&rsquo; option, which you can specify to the left of a <small>CVS</small> command!'''

: &lsquo;<code>-r</code>&rsquo; is available with the <code>checkout</code>, <code>commit</code>, <code>diff</code>, <code>history</code>, <code>export</code>, <code>rdiff</code>, <code>rtag</code>, and <code>update</code> commands.

;<code>-W</code>
: Specify file names that should be filtered.  You can use this option repeatedly.  The spec can be a file name pattern of the same type that you can specify in the &lsquo;<tt>.cvswrappers</tt>&rsquo; file. Available with the following commands: <code>import</code>, and <code>update</code>.



----

<div class="header">
<p>
Next: [[cvs: admin--Administration#admin&mdash;Administration|admin]], Previous: [[cvs: Global options#Global options|Global options]], Up: [[cvs: Guide to CVS commands#Guide to CVS commands|CVS commands]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
